1. Field of the Invention
The present invention relates to an automatic focusing apparatus and, more particularly, to an automatic focusing apparatus for performing automatic focusing of a focal point of an optical device such as a camera.
2. Description of the Related Art
A patent concerning the technique of an automatic focusing apparatus using two images picked up in focusing states at two different positions has already been issued to the present inventors (U.S. Pat. No. 4,990,947). This technique will be briefly described with reference to FIGS. 13 and 14. Details of the above mentioned U.S. Patent will be incorporated therein.
Referring to FIG. 13, reference numeral 1 denotes a photographic optical system which is driven by a driver circuit 3 through a pulse motor 2. An image sensor 4 such as an interline CCD (Charge-Coupled Device) is arranged near the focal plane of the photographic optical system 1. An output signal from this image sensor 4 is output to a window circuit 5 for extracting an image signal corresponding to an area subjected to focusing.
A switching circuit 6 switches combinations of bandpass filters (to be referred to as BPFs or BPF hereinafter) 7a, 7b, and 7c and BPFs 8a, 8b, and 8c and supplies an output signal from the window circuit 5 to a predetermined one of the BPFs. Image signals having passed through the BPFs 7a and 8a, the BPFs 7b and 8b, and the BPFs 7c and 8c are supplied to power detectors 9a, 9b, and 9c for obtaining spatial frequency components of the input image signals. The power detectors 9a, 9b, and 9c output spatial frequency components S.sub.2, S.sub.4, and S.sub.6 as their output signals. These output signals are input to hold circuits 10a, 10b, and 10c, respectively. The hold circuits 10a, 10b, and 10c output spatial frequency components S.sub.1, S.sub.3, and S.sub.5.
Reference numerals 11a, 11b, and 11c denote dividers for calculating spatial frequency component ratios Y.sub.1 (=S.sub.1 /S.sub.2), Y.sub.2 (=S.sub.3 /S.sub.4), and Y.sub.3 (=S.sub.5 /S.sub.6) from the spatial frequency components S.sub.1 to S.sub.6. The spatial frequency component ratios Y.sub.1, Y.sub.2, and Y.sub.3 are converted into digital signals Y.sub.11, Y.sub.12, and Y.sub.13 by A/D (analog-to-digital) converters 12a, 12b, and 12c, respectively. The digital signals Y.sub.11, Y.sub.12, and Y.sub.13 are input to latch circuits 13a, 13b, and 13c, respectively. The spatial frequency component ratios are input to an electronic scanning circuit 14. The electronic scanning circuit 14 compares the detected spatial frequency component ratios with MTF (Modulation Transfer Formation) ratios of the photographic optical system 1, which are calculated in respective focusing states in advance. The electronic scanning circuit 14 outputs a defocus amount D.
Reference numeral 15 in FIG. 13 denotes a microprocessor for performing focus adjustment. The microprocessor 15 outputs a clock pulse .phi. to the electronic scanning circuit 14, a drive control signal Cd for the photographic optical system 1 to the driver circuit 3, and a switching signal Cc for a combination of the BPFs 7a to 7c and 8a to 8c to the switching circuit 6.
FIG. 14 shows the circuit arrangement of the electronic scanning circuit 14. Referring to FIG. 14, reference numerals 16a, 16b, 16c, and 17 denote ROMs (Read-Only Memories). The ROMs 16a, 16b, and 16c store MTF ratios of N different focusing states at spatial frequencies (u.sub.1,u.sub.11), (u.sub.2,u.sub.12), and (u.sub.3,u.sub.13) (to be described later). The ROM 17 stores defocus amounts corresponding to these focus states. Storage values d.sub.1 to d.sub.4 at addresses designated by predetermined numbers of clock pulses .phi. are read out from the ROMs 16a to 16c and 17 through a counter 24. This indicates that the read access from these ROMs is performed by electronic scanning.
A signal Ss corresponding to differences between the MTF ratios output from the ROMs 16a to 16c and the spatial frequency component ratios Y.sub.11, Y.sub.12, and Y.sub.13 output from the latch circuits 13a to 13c is obtained by subtracters 18a, 18b, and 18c, absolute value circuits 19a, 19b, and 19c, and an adder 20. In addition, the minimum value of the signal Ss is obtained by a differentiator 21 and a zero-crossing detector 22. The defocus amount D is obtained by a defocus amount detector 23 using the minimum value and the readout value d4 from the ROM 17.
The microprocessor 15 calculates a target stop position of the photographic optical system 1 in accordance with the detected defocus signal D and a present moving velocity V of the photographic optical system 1 and outputs a control signal Cd for focus adjustment. The pulse motor 2 is controlled and driven on the basis of the control signal Cd to adjust the movement of the photographic optical system 1. If the moving direction of the photographic optical system 1 is opposite to that described above, the photographic optical system is controlled to be moved in the opposite direction. If the target stop position is determined to be far away, the photographic optical system is moved at a velocity higher than the present moving velocity V. The first defocus amount adjustment is thus completed. When the photographic optical system comes close to the target position, the velocity is reset to V again, and the second defocus amount adjustment is performed in the same manner as in the first defocus amount adjustment. That is, an image pickup operation of each frame is performed by the image sensor 4, and the above arithmetic operations are performed on the basis of this image signal, thereby obtaining a defocus amount. In the second defocus amount adjustment, the high-frequency BPFs 17a to 19a, and values corresponding to u.sub.1, u.sub.2, and u.sub.3 are used as the data from the ROMs 16a to 16c to calculate a defocus amount. The target stop position of the photographic optical system 1 is calculated again to adjust movement of the photographic optical system 1. When the photographic optical system reaches the target position, its movement is stopped, and focus adjustment is completed.
In the apparatus of FIG. 13, since the MTF ratio pattern of an image using MTF ratios corresponding to a plurality of frequencies at two different positions of the photographic optical system 1 is detected, the direction and amount of defocusing at an arbitrary position can be detected by one focus adjustment operation regardless of the state (features and brightness) of an object to be photographed.
In this automatic focusing apparatus, the MTF ratios in the N different focusing states are stored in the ROMs 16a to 16c, as described above. Each MTF ratio changes in accordance with the distance to the object, the distance between the two positions of the photographic optical system 1, the F-number of the photographic optical system 1, and the focal length of the photographic optical system 1. For this reason, the ROMs 16a to 16c must store MTF ratios upon various changes in these parameters.
For example, the MTF ratios stored in the ROMs 16a to 16c are stored in a table format shown in FIG. 15. MTF ratios m.sub.11 to m.sub.86 defined by object distances of =to 0.9 m in the leftmost column and the spatial frequencies u.sub.1 to u.sub.6 in the uppermost row and the second column are stored. The rightmost column in FIG. 15 represents addresses 0 to 70 of the photographic optical system which correspond to the object distances. These addresses correspond to those of the ROM 17.
The table format in FIG. 15 is formed between address A.sub.1 =10 and address A.sub.2 =40 corresponding to the two positions of the photographic optical system 1. Focus detection is performed using this table format. This table format is determined by the following parameters:
(1) two addresses of the photographic optical system for picking up images at two different positions: A.sub.1 and A.sub.2 PA1 (2) focal length of the photographic optical system: f PA1 (3) F-number of the photographic optical system: F PA1 a photographic optical system, having a predetermined characteristic value, a focal plane, and an optical axis, for forming an optical image of an object to be photographed; PA1 driving means for moving the photographic optical system in a direction of the optical axis; PA1 storage means for prestoring MTF ratios respectively corresponding to a plurality of spatial frequencies at each of two positions near a focal plane of the photographic optical system in accordance with a defocus amount of the photographic optical system, the MTF ratios being stored in correspondence with a predetermined value of characteristic values of the photographic optical system; PA1 spatial frequency component ratio calculating means for calculating a ratio of a plurality of spatial frequency components corresponding to the respective focusing states on the basis of signals output from the image pickup means in accordance with the plurality of different focusing states formed by the photographic optical system; PA1 converting means for converting an MTF ratio value stored in the storage means, in accordance with the characteristic values of the photographic optical system; PA1 defocus amount calculating means for comparing the MTF ratio converted by the converting means with the spatial frequency component ratio calculated by the spatial frequency component ratio calculating means to calculate the defocus amount of the photographic optical system; and PA1 control means for supplying a control signal for driving the photographic optical system by a predetermined amount in the direction of the optical axis of the photographic optical system in accordance with the defocus amount output from the defocus amount calculating means and the characteristic values of the photographic optical system.
That is, the MTF ratio table shown in FIG. 15 is required every time one of the above parameters changes. It is understood that the number of values of the MTF ratios to be stored is very large.
If digital data Y.sub.11, Y.sub.12, and Y.sub.13 representing the frequency component ratios are 8-bit data, respectively, the number of focusing states is N =256. The ROMs 16a to 16c store 512 (=256.times.2) data.